<template>
  <div class="Top" :class="{chang:$parent.quanwidth}">
  <img @click="$parent.quanwidth = !$parent.quanwidth;$root.setcss()" src="../assets/images/images/topbtn1_03_03.png" style="margin-left: 20px;margin-top: 15px;float: left;margin-right: 10px;cursor: pointer;">
    欢迎来到速选系统(连接成功)
    <p>
      <img src="../assets/images/images/shizhong_03.png" alt="" style="margin-top: 16px;float: left;margin-left: 50px;margin-right: 10px;">
      2019-7-14 12:25:09
    </p>
    <p style="margin-left: 40px;">
      到期时间：12天
    </p>
    <p style="margin-left: 40px;">
      <button style="background: none;border: 0;color: red;" @click="relogin">退出登录123</button>
    </p>
    <p class="tools">
      <img src="../assets/images/scale1.png" alt="" @click="tools(0)">
      <img src="../assets/images/scale.png" alt="" @click="tools(1)">
      <img src="../assets/images/close.png" alt="" @click="tools(2)">
    </p>
  </div>
</template>

<script>
export default {
  name: 'Top',
  props: [],
  data() {
    return {
      ismenu:0
    };
  },
  methods: {
    relogin(){
      ipcRenderer.send('login');
      $cookies.remove('userdata');
    },
    tools(id){
      if(!ipcRenderer) return;
      if(id == 0){
        ipcRenderer.send('min');
      }else if(id == 1){
        ipcRenderer.send('max');
      }else{
        ipcRenderer.send('closeWin');
      }
    }
  },
  computed: {},
  mounted() {}
};
</script>
<style scoped>
/* @import '../assets/css/top.css'; */
.Top{height: 50px;overflow: hidden;position: relative; box-sizing: content-box; position: fixed;z-index: 1;width:calc(100% - 90px);transition: all .3s ease;right: 0;border-bottom: 10px solid #f7f6f6;line-height: 50px;font-size: 16px;color: #000;}
.chang{width:calc(100% - 200px)}
.Top >p{display: inline-block;  }
.tools{float: right;position: absolute;right: 0;background: #fff;}
.tools img{width: 16px;margin: 0 13px;cursor: pointer;}
</style>
